home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / CheckInAll < prev    next >
Encoding:
Text File  |  1990-09-14  |  1.6 KB  |  72 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        CheckInAll
  3. #
  4. #    Contains:    script to check in all checked-out files in the current project tree
  5. #
  6. #    Usage:        CheckInAll [-noconfirm]
  7. #
  8. #    Status:        CheckInAll may return the following status values:
  9. #
  10. #                    0        success
  11. #                    1        error
  12. #                    2        user canceled
  13. #
  14. #                CheckInAll checks in all files from the current project tree.
  15. #
  16. #    Written by:    scott douglass and Darin Adler
  17. #
  18. #    Copyright:    © 1988, 1989 by Apple Computer, Inc., all rights reserved.
  19. #
  20. #    Change History:
  21. #
  22. #        12/6/89        sad        use CheckedOutFiles
  23. #        11/15/89    dba        check status from ProjectInfo
  24. #        11/9/89        dba        twiddled relentlessly
  25. #        11/6/89        sad        add -noconfirm option
  26. #        5/26/89        sad        changed ProjectInfo output parsing
  27. #        2/17/89        sad        use ProjectInfo -s; redirect to {somewhere}
  28. #        11/17/88    sad        fix Can’t parse logic
  29. #        11/4/88        sad        fix so actually works, current project only
  30. #        11/4/88        sad        cloned from OpenCheckedOut
  31. #
  32. #    To Do:
  33. #        add [-project project | -m] options
  34. #
  35.  
  36. Set Exit 0
  37.  
  38. # the following helps to debug until MPW sends echos to Dev:Console instead of Dev:StdErr
  39.  
  40. If {Echo}
  41.     Set somewhere "∑∑ '{Worksheet}'"
  42. Else
  43.     Set somewhere "∑ Dev:Null"
  44. End
  45.  
  46. Begin
  47.  
  48.     If {#} == 1
  49.         If "{1}" =~ /-noconfirm/
  50.             Set DoConfirm 0
  51.         Else
  52.             Echo "### {0} - “{"Parameters"}” doesn’t make sense." > Dev:StdErr
  53.             Exit 1
  54.         End
  55.     Else If {#} == 0
  56.         Set DoConfirm 1
  57.     Else
  58.         Echo "### {0} - “{"Parameters"}” doesn’t make sense." > Dev:StdErr
  59.         Exit 1
  60.     End
  61.  
  62.     If {DoConfirm}
  63.         Confirm "Do you want to check in all modifiable files in the project “`Project -q`”?"
  64.         Exit 2 If {Status}
  65.     End
  66.  
  67.     For File In `CheckedOutFiles`
  68.         CheckIn "{File}" > Dev:StdErr
  69.     End
  70.  
  71. End {somewhere}
  72.